package com.sayimo.maker.user.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sayimo.framework.database.mybatis.AbstractMybatisBaseDao;
import com.sayimo.framework.exception.DaoException;
import com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao;
import com.sayimo.maker.user.vo.WalletIncomeExpendRecord;

/**  
 * @Title: WalletIncomeExpendRecordInterfaceImplDao.java
 * @Package com.sayimo.maker.user.dao.impl
 * @Description: TODO(用一句话描述该文件做什么)
 * @author 田超
 * @date 2017年2月10日 下午5:08:37
 * @version V1.0  
 */
@Repository("walletIncomeExpendRecordInterfaceDao")
public class WalletIncomeExpendRecordInterfaceImplDao extends AbstractMybatisBaseDao<WalletIncomeExpendRecord> implements WalletIncomeExpendRecordInterfaceDao{
	
	public int insertSelective(WalletIncomeExpendRecord expendRecord) throws DaoException {
		return this.mybatisInterfaceBaseDao.insert("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.insertSelective", expendRecord);
	}
	
	/**
	 * 
	* @Title: querySliverRecord
	* @Author: 田超
	* @Date:日期：2017年2月10日 : 下午6:19:52
	* @Description: 查询充值记录
	* @return List<WalletIncomeExpendRecord>
	* @Version 1.0.0
	 */
	public List<WalletIncomeExpendRecord> querySliverRecord(Integer customerId) throws DaoException{
		return this.mybatisInterfaceBaseDao.query("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.querySliverRecord",customerId);
	}

	public Double selectRecord(Integer customerId) throws DaoException {
		
		return (Double) this.mybatisInterfaceBaseDao.getObject("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.selectByCustmerId", customerId);
	}

	@Override
	public List<Object> selectOrderByExpend() throws DaoException {
		
		return this.mybatisInterfaceBaseDao.queryObject("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.selectOrderByExpend", null);
	}

	@Override
	public List<Object> selectOrderByIncome() throws DaoException {
		return this.mybatisInterfaceBaseDao.queryObject("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.selectOrderByIncome", null);
	}

	@Override
	public List queryWalletInOutByCond(Map<String, Object> paramMap) throws DaoException{
		return this.mybatisInterfaceBaseDao.queryObject("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.querySliverRecord", paramMap);
	}
	
	public int updateWalletIncomeExpend(WalletIncomeExpendRecord expendRecord) throws DaoException{
		return this.mybatisInterfaceBaseDao.update("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.updateWalletIncomeExpend", expendRecord);
	}
	
	public WalletIncomeExpendRecord getWalletIncomeExpendByEmsNo(String emsNo) throws DaoException{
		return this.mybatisInterfaceBaseDao.get("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.getWalletIncomeExpendByEmsNo", emsNo);
	}

	/**
	* @Package com.sayimo.maker.user.dao.impl
	* @Author 谭新
	* @MethodName: getWalletIncomeExpend
	* @Description:获取交易记录
	* @Date 2017年4月12日,下午2:37:22
	*/
	@Override
	public WalletIncomeExpendRecord getWalletIncomeExpend(
			Map<String, Object> paramMap) throws DaoException {
		return (WalletIncomeExpendRecord)this.mybatisInterfaceBaseDao.getObject("com.sayimo.maker.user.dao.WalletIncomeExpendRecordInterfaceDao.getWalletIncomeExpend", paramMap);
	}
}
